import javax.lang.model.element.QualifiedNameable;
import java.util.Scanner;

public class Player extends Father {
    public void generate() {
        String quan = "";
        int number =0;
        while (true){
               Scanner scan =new Scanner(System.in);
              quan = scan.next();
               if (quan.equals("石头")||quan.equals("布")||quan.equals("剪刀")){
                   System.out.println("你出的是"+quan);
                   break;
               }else{
                   System.out.println("非法输入");
               }
        }
        if(quan.equals("石头")){
            number = 0;
        }
        if(quan.equals("剪刀")){
            number = 1;
        }
        if(quan.equals("布")){
            number = 2;
        }
        this.setNumber(number);
    }
}
